# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'page1.ui'
#
# Created: Sun Mar 29 16:49:52 2009
#      by: PyQt4 UI code generator 4.4.3
#
# WARNING! All changes made in this file will be lost!

import sys
import os
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import Qt
#from Main import *

class Page1(object):
    def __init__(self,session):
		self.session=session
		self.app = QtGui.QApplication(sys.argv)
		self.window=QtGui.QDialog()
                self.retour=0
                self.parametre={}
                

    def suivant(self):
        self.window.close()
        os.system("./launch_page2.py")
     
         
    def affich(self,param):
	self.setupUi(self.window)
	self.window.show()
 	sys.exit(self.app.exec_())
    def close(self):
        self.window.close()
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(1280, 740)
        self.pushButton_suivant = QtGui.QPushButton(Dialog)
        self.pushButton_suivant.setGeometry(QtCore.QRect(1050, 650, 171, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(12)
        self.pushButton_suivant.setFont(font)
        self.pushButton_suivant.setObjectName("pushButton_suivant")
        self.pushButton_annuler = QtGui.QPushButton(Dialog)
        self.pushButton_annuler.setGeometry(QtCore.QRect(840, 650, 171, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(12)
        self.pushButton_annuler.setFont(font)
        self.pushButton_annuler.setObjectName("pushButton_annuler")

        self.groupe_image = QtGui.QWidget(Dialog)
        self.groupe_image.setGeometry(QtCore.QRect(310,210,650,550))
        self.groupe_image.setObjectName("groupe_image")

        #cadre autour du plan
#        self.frame = QtGui.QFrame(self.groupe_image)
#        self.frame.setGeometry(QtCore.QRect(20,0,600,200))
#        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
#        self.frame.setFrameShadow(QtGui.QFrame.Raised)
#        self.frame.setObjectName("frame")   

        # label qui contiendra le plan
        self.plan = QtGui.QLabel(self.groupe_image)

        # création d'un objet image pour pouvoir la manipuler ensuite
        objImg = QtGui.QImage('../images/gwapiwy.jpg') 

        # Initialisation du label
        self.plan.setPixmap(QtGui.QPixmap.fromImage(objImg.scaled(600,400,Qt.KeepAspectRatio,Qt.FastTransformation)))

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.pushButton_suivant, QtCore.SIGNAL("clicked()"), self.suivant)
        QtCore.QObject.connect(self.pushButton_annuler, QtCore.SIGNAL("clicked()"), self.close)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_suivant.setText(QtGui.QApplication.translate("Dialog", "Suivant >>", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_annuler.setText(QtGui.QApplication.translate("Dialog", "Annuler", None, QtGui.QApplication.UnicodeUTF8))

